<script lang="ts" setup>
import parent from '@/components/myc/aa.vue'
import {ref, reactive, provide} from 'vue'

provide('pid', 120)
const uid = ref(200)
provide('uid', uid)

const user = ref({
  id: 11,
  name: '李四'
})
const book = reactive({
  bookid: 111,
  bookname: '《vue3入门》'
})

provide('book', book)
provide('user', user)
provide('addr', ['郑州', '北京', '深圳', '上海'])

</script>

<template>
  <button @click="uid++">App.vue uid++</button>
  <button @click="user.name='jack'">修改user姓名</button>
  <parent/>
</template>
